package GUIs;

import Graphics.FieldGraphics;
import java.awt.Graphics;
import javax.swing.JPanel;

/**
 *
 * @author johannes
 */
public class JHousePanel extends JPanel {

    private FieldGraphics fg;

    public JHousePanel() {
    }

    public void setFieldGraphics(FieldGraphics fg) {
        this.fg = fg;
    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);
        if (fg != null) {
            fg.drawHouse(g, this.getWidth(), this.getHeight());
        }
    }

    @Override
    public void repaint() {
        super.repaint();
    }
}
